<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $.ajax({
    url: "http://barreras.altervista.org/tlista.php",
 
    data: {
        id: 123
    },
 
    type: "GET",
 
    dataType : "json",
 
    success: function( json ) {
        alert(json);
    },
 
    error: function( xhr, status, errorThrown ) {
        alert( "Sorry, there was a problem!" );
        console.log( "Error: " + errorThrown );
        console.log( "Status: " + status );
        console.dir( xhr );
    },
 
    complete: function( xhr, status ) {
        alert( "The request is complete!" );
    }
});
  });
});
</script>
</head>
<body>

<div id="div1"><h2>Let jQuery AJAX Change This Text</h2></div>
<button>Get External Content</button>

</body>
</html>
